<table cellpadding="5" cellspacing="10">
      <th align="center"> </th>
  <tr>
    <td align="right"><%= label_tag :user_id, 'User :',:class=> 'form_text_field_label' %> <%=  f.hidden_field :protocol_id %></td>
    <td><%= f.select :user_id, Cartasur::User.all.collect{ |u| [u.login, u.id]}, :prompt => '-Select user-', :selected => @visited.user_id, :class=>'form_text_field' %></td>
  </tr>
      <tr>
        <td align="right"><%= label_tag :objective_id, 'Objective :',:class=> 'form_text_field_label' %></td>
        <td><%= f.select :objective_id, Cartasur::Objective.all.collect{ |o| [o.location_name << "| Days: " << o.time_range << " | Months: " << o.months, o.id]}, :prompt => '-Select objective-', :selected => @visited.objective_id, :class=>'form_text_field' %></td>
      </tr>

  <tr>
    <td align="right"><%= label_tag :track_id, 'Visited Track :',:class=> 'form_text_field_label' %></td>
    <td><%= f.select :track_id, Cartasur::Track.all.collect{ |t| [t.track_details, t.id]}, :prompt => '-Select track-', :selected => @visited.track_id, :class=>'form_text_field' %></td>
  </tr>

  <tr>
    <td align="right" class="form_text_field_label_fieldset" >
      Uploaded photos:
    </td>
    <td>
      <div class="flexslider">
          <fieldset id="objective-users" style="border-style: none;">
            <ul class="slides">
              <%= f.fields_for :visiteds_images do | image| %>
                  <%= render 'visiteds_image_fields', f:image, f_parent: f, formtype: formtype %>
              <% end -%>
            </ul>
            <%=  link_to_add_association 'add image', f, :visiteds_images,
                                         'data-association-insertion-node' => "#objective-users ol",
                                         'data-association-insertion-method' => "append",
                                         :wrap_object => Proc.new {|vimage| vimage }  %>
          </fieldset>
      </div>
    </td>
  </tr>

  <tr>
    <td></td>
    <td><%= submit_tag 'Save ' %></td>
  </tr>
</table>
